home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / getpeername.z / getpeername
Encoding:
Text File  |  2002-10-03  |  2.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4. GGGGEEEETTTTPPPPEEEEEEEERRRRNNNNAAAAMMMMEEEE((((2222))))                                                  GGGGEEEETTTTPPPPEEEEEEEERRRRNNNNAAAAMMMMEEEE((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      getpeername - get name of connected peer
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ssssoooocccckkkkeeeetttt....hhhh>>>>
  14.  
  15.      iiiinnnntttt ggggeeeettttppppeeeeeeeerrrrnnnnaaaammmmeeee ((((iiiinnnntttt ssss,,,, ssssttttrrrruuuucccctttt ssssoooocccckkkkaaaaddddddddrrrr ****nnnnaaaammmmeeee,,,, iiiinnnntttt ****nnnnaaaammmmeeeelllleeeennnn))));;;;
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      _G_e_t_p_e_e_r_n_a_m_e returns the name of the peer connected to socket _s.  The
  19.      _n_a_m_e_l_e_n parameter should be initialized to indicate the amount of space
  20.      pointed to by _n_a_m_e.  On return it contains the actual size of the name
  21.      returned (in bytes).  The name is truncated if the buffer provided is too
  22.      small.
  23.  
  24. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  25.      A 0 is returned if the call succeeds, -1 if it fails.
  26.  
  27. EEEERRRRRRRROOOORRRRSSSS
  28.      The call succeeds unless:
  29.  
  30.      [EBADF]        The argument _s is not a valid descriptor.
  31.  
  32.      [ENOTSOCK]     The argument _s is a file, not a socket.
  33.  
  34.      [ENOTCONN]     The socket is not connected.
  35.  
  36.      [ENOBUFS]      Insufficient resources were available in the system to
  37.                     perform the operation.
  38.  
  39.      [EFAULT]       The _n_a_m_e parameter points to memory not in a valid part of
  40.                     the process address space.
  41.  
  42. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  43.      accept(2), bind(2), socket(2), getsockname(2)
  44.  
  45. NNNNOOOOTTTTEEEESSSS
  46.      ABI-compliant versions of the above call can be obtained from
  47.      _l_i_b_s_o_c_k_e_t._s_o.
  48.  
  49.      This call does not return useful results when used on sockets of type
  50.      AF_UNIX, unless the remote end was explicitly bound to a pathname.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.